<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>对象</title>
</head>
<body>
	<script type="text/javascript">

	//方法一
	// var person=new Object();
	// 	person.name="茶图腾";
	// 	person.age="25";
	// 	person.tall="170";
	// 	alert(person.name)


	// var cai=new Object()
	// 	cai.xingming="茶图腾";
	// 	cai.nianling="25";
	// 	cai.shengao="170";
	// 	cai.teshu=function(){
	// 		alert("特异功能");
	// 	}
		// cai.teshu()
		// alert(cai.xingming)
		// document.write(cai.xingming)



		// 构建方法
		function ziji(){
			this.xingming="茶图腾";
			this.nianling="16";
			this.shengao="170";
			this.jiguan="罗定";
			this.techang=function(){
				alert("吹牛逼")
			}
		}
		var wo=new ziji(xingming)



	</script>
</body>
</html>